package demo2;


interface IShape{
    void draw();

}

class Rect implements IShape{
    @Override
    public void draw() {
        System.out.println("矩形");
    }
}


class Flower implements IShape{
    @Override
    public void draw() {
        System.out.println("花");
    }
}

class Cycle implements IShape{
    @Override
    public void draw() {
        System.out.println("圆");
    }
}




public class Test {
    public static void drawMap(IShape ishape){
        ishape.draw();
    }


    public static void main(String[] args) {
        drawMap(new Cycle());
        drawMap(new Flower());
        drawMap(new Rect());
    }
}
